using System;
using System.Collections.Generic;
using System.Text;
using SDMX_Common = SDMX_ML.Framework.Common;

namespace SDMX_ML.Framework.Generic
{
    /// <summary>
    /// Class contaning observations, attributes and time.
    /// </summary>
    public class ObsType
    {
        private string _time;
        private ObsValueType _obs;
        private List<ValueType> _attributes = new List<ValueType>();
        private SDMX_Common.AnnotationsType _annotations;

        /// <summary>
        /// ObsType.
        /// </summary>
        /// <param name="time">Time.</param>
        public ObsType(string time)
        {
            if (!String.IsNullOrEmpty(time))
            {
                _time = time;
            }
            else
            {
                throw new Exception("Time is required in ObsType.");
            }
        }

        public SDMX_Common.AnnotationsType Annotations
        {
            get { return _annotations; }
            set { _annotations = value; }
        }

        public string Time
        {
            get { return _time; }
            set { _time = value; }
        }

        public ObsValueType ObsValue
        {
            get { return _obs; }
            set { _obs = value; }
        }

        public List<ValueType> Attributes
        {
            get { return _attributes; }
            set { _attributes = value; }
        }
        
        
    }
}
